package demoMod.stsconsole.powers;

import demoMod.stsconsole.characters.AbstractPlayer;
import demoMod.stsconsole.core.AbstractCreature;
import demoMod.stsconsole.interfaces.TurnStartSubscriber;

public class DemonFormPower extends AbstractPower implements TurnStartSubscriber {
    public static final String ID = "DemonFormPower";

    public DemonFormPower(AbstractCreature owner, int amount) {
        super(ID, owner, amount);
    }

    @Override
    public String getUpdatedDescriptions() {
        return String.format(this.description, this.amount[0]);
    }

    @Override
    public void atTurnStart(boolean isPlayer) {
        if (owner instanceof AbstractPlayer == isPlayer) {
            this.owner.applyPower(this.owner, new StrengthPower(this.owner, this.amount[0]));
        }
    }
}
